package ui;

import java.awt.KeyEventDispatcher;
import java.awt.event.KeyEvent;

import javax.swing.JDialog;

public class ProgramKeyManager implements KeyEventDispatcher
{

	@Override
	public boolean dispatchKeyEvent(KeyEvent e) {
		if (e.getKeyCode() == 16) {// && ((e.getKeyCode() != KeyEvent.VK_UP) && (e.getKeyCode() != KeyEvent.VK_UP))) {
			return true;
		}
		if (e.getKeyCode() == 17 || (e.getKeyCode() == 27 && !(e.getComponent() instanceof JDialog))) {
			return true;
		}
		return false;
	}

}
